package org.hegang.design.second.proxy;

public class MarryCompany implements Marry {

    // 真实对象
    private Marry target;

    public MarryCompany(Marry marry) {
        this.target = marry;
    }

    @Override
    public void helloMarry() {
        before();
        this.target.helloMarry();
        after();
    }

    private void after() {
        System.out.println("结婚后，收尾款！");
    }

    private void before() {
        System.out.println("结婚前，布置现场！");
    }
}
